//package com.runa.monitor.platinterface.platInterface;
//
//import com.runa.monitor.comm.dto.NodeEquModel;
//import com.runa.monitor.platinterface.platService.InterfaceService;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.util.List;
//
///**
// * @author zhuj
// */
//@RestController
//@RequestMapping("feign/balanceWork")
//public class BalancePlatInterface {
//
//    private static final Logger logger = LoggerFactory.getLogger(BalancePlatInterface.class);
//
//    @Resource
//    private InterfaceService interfaceService;
//
//    @GetMapping("readFmuHouse/{fmuSerial}/{taskNo}")
//    public String readFmuHouse(@PathVariable String fmuSerial, @PathVariable Integer taskNo) {
//        logger.info("平衡请求—户设备全读  网络设备号：{}, 任务号：{}", fmuSerial, taskNo);
//        return interfaceService.rccReadNetEqu(fmuSerial, taskNo, NodeEquModel.NodeEquType.H_METER, NodeEquModel.NodeEquType.VALVE);
//    }
//
//    @GetMapping("readFmuBuild/{fmuSerial}/{taskNo}")
//    public String readFmuBuild(@PathVariable String fmuSerial, @PathVariable Integer taskNo) {
//        logger.info("平衡请求—楼宇设备全读  网络设备号：{}, 任务号：{}", fmuSerial, taskNo);
//        return interfaceService.rccReadNetEqu(fmuSerial, taskNo, NodeEquModel.NodeEquType.B_METER, NodeEquModel.NodeEquType.LZ_VALVE);
//    }
//
//    @GetMapping("readUnitDevice/{fmuSerial}/{taskNo}")
//    public void readUnitDevice(@PathVariable String fmuSerial,
//                               @PathVariable Integer taskNo,
//                               String meterSerial, String valveSerial) {
//        logger.info("平衡请求—读取单元调控设备  网络设备编号：{}, 楼表编号：{}, 楼阀编号：{}, 任务号：{}", fmuSerial, meterSerial, valveSerial, taskNo);
//        interfaceService.readUnitDevice(taskNo, fmuSerial, meterSerial, valveSerial);
//    }
//
//    @GetMapping("ctrlUnitDevice/{fmuSerial}/{taskNo}")
//    public void ctrlUnitDevice(@PathVariable String fmuSerial,
//                               @PathVariable Integer taskNo,
//                               @RequestParam("valveSerial") List<String> valveSerial, String valveOpen) {
//        logger.info("平衡请求—控制单元调控设备  网络设备编号：{}, 阀编号：{}, 开度：{}, 任务号：{}", fmuSerial, valveSerial, valveOpen, taskNo);
//        interfaceService.ctrlUnitDevice(taskNo, fmuSerial, valveSerial, valveOpen);
//    }
//
//    @PostMapping(value = "valveOnOffControl/{fmuSerial}/{taskNo}")
//    public void houseValveControl(@PathVariable String fmuSerial,
//                           @PathVariable Integer taskNo,
//                           @RequestParam("opening") Integer opening,
//                           @RequestBody List<String> valveSerial) {
//        logger.info("平衡请求—控制户调控设备  网络设备编号：{}, 阀编号：{}, 开度：{}, 任务号：{}", fmuSerial, valveSerial, opening, taskNo);
//        interfaceService.valveOnOffControl(fmuSerial, taskNo, valveSerial, true, opening, false);
//    }
//
//
//    @GetMapping("valveTemperatureControl/{fmuSerial}/{taskNo}")
//    public void valveTemperatureControl(@PathVariable("taskNo") Integer taskNo,
//                                        @PathVariable("fmuSerial") String fmuSerial,
//                                        @RequestParam("temperature") Float temperature,
//                                        @RequestParam("ifLock") Boolean ifLock,
//                                        @RequestParam(value = "temperatureUp", required = false) Float temperatureUp,
//                                        @RequestParam(value = "temperatureDown", required = false) Float temperatureDown,
//                                        @RequestParam("valveSerial") List<String> valveSerial) {
//        logger.info("平衡请求—户阀温度控制  " +
//                        "网络设备编号：{}, 阀编号：{}, 温度：{}, 锁定：{}, 上限：{}, 下限：{}, 任务号：{}",
//                fmuSerial, valveSerial, temperature, ifLock, temperatureUp, temperatureDown, taskNo);
//        interfaceService.valveTemperatureControl(fmuSerial, taskNo, valveSerial, temperature, ifLock, temperatureUp, temperatureDown, false);
//    }
//
//    @GetMapping("setMeterReadingCycleParameter/{fmuSerial}/{taskNo}")
//    public void setMeterReadingCycleParameter(@PathVariable("fmuSerial") String fmuSerial,
//                                              @PathVariable("taskNo") Integer taskNo,
//                                              @RequestParam("minute") Integer minute) {
//        logger.info("平衡请求—抄表周期设定  网络设备编号：{}, minute: {}, 任务号：{}", fmuSerial, minute, taskNo);
//        interfaceService.setMeterReadingCycleParameter(fmuSerial, taskNo, minute, false);
//    }
//}
